{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8970988e-3eea-4cb5-87ff-64688bfcfa58",
   "metadata": {},
   "source": [
    "Chapter 06\n",
    "# 逻辑运算符\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "089d5868-2153-4720-86e6-9607524e90ad",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "False\n",
      "False\n",
      "False\n"
     ]
    }
   ],
   "source": [
    "# 和 and\n",
    "print(True and True)\n",
    "print(True and False)\n",
    "print(False and True)\n",
    "print(False and False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "590997b2-8209-48e0-9acc-565d6012a058",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "True\n",
      "True\n",
      "False\n"
     ]
    }
   ],
   "source": [
    "# 或 or\n",
    "print(True or True)\n",
    "print(True or False)\n",
    "print(False or True)\n",
    "print(False or False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "c0693cd1-400a-4e1f-8471-8e56c89c7d3b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "# 非 not\n",
    "print(not True)\n",
    "print(not False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
